package com.azxc.rapid.plus.system.feign;

import com.azxc.rapid.core.tenant.annotation.NonDS;
import com.azxc.rapid.core.tool.api.R;
import com.azxc.rapid.plus.dict.feign.IDictPlusClient;
import com.azxc.rapid.plus.system.service.IDictPlusService;
import com.azxc.rapid.system.entity.Dict;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;

/**
 * @author linym
 * @className: DictPlusClient
 * @description:
 * @date 2022/9/2 16:33
 * @version：1.0
 */
@NonDS
@ApiIgnore
@RestController
@AllArgsConstructor
public class DictPlusClient implements IDictPlusClient {

	private final IDictPlusService service;


	@Override
	@GetMapping(GET_DICT_LIST_BY_CODE_OR_NAME)
	public R<List<Dict>> getDictListByCodeOrName(String code,String searchName) {
		return R.data(service.getDictListByCodeOrName(code,searchName));
	}

}
